package com.cloud.prac.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AssetCacheModel implements Serializable {

    private static final long serialVersionUID = 8652849029304924238L;

    private List<AccountAssetListModel> assetList = new ArrayList<>();
    private AccountAssetModel assetModel = new AccountAssetModel();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    @ToString
    public static class AccountAssetListModel implements Serializable {

        private static final long serialVersionUID = 4490735186910130690L;

        private List<FundInfo> fundInfoList = new ArrayList<>();
        private String accountName;
        private String idNo;
        private String productType;
        private BigDecimal assetAmount;
        private String assetAmountFormat;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    @ToString
    public static class AccountAssetModel implements Serializable {

        private static final long serialVersionUID = 3204626980998330726L;

        private String accountName;
        private String idNo;
        private String dateFormat;
        private String assetAmount;
        private String assetAmountFormat;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    @ToString
    public static class FundInfo implements Serializable {

        private static final long serialVersionUID = -52803039619306788L;

        private String fundName;
        private String fundCode;
        private String share;
        private String nav;
        private String navDate;
        private String holdValue;

    }

}
